console.log('加载page_twcqb.js');
myApp.onPageInit("twc-qb", function (page) {
	//获取url参数
	var uuid = page.query.uuid;
	var major = page.query.major;
	var minor = page.query.minor;
	//回到qblist.html时加上参数
	var url = $$('.twc-qb-back').attr('href');
	url +="?uuid="+uuid+"&major="+major+"&minor="+minor;
	$$('.twc-qb-back').attr('href',url);
	
	$$("#twc-qb .my-submit").click(function(){
		//获取密钥
		var my = $$("input[name='my']").val();
		//console.log(my);
		//校验密钥
		switch(my){
			case '殷商':
				var check = true;
				break;
			case 'yinshang':
			    var check = true;
			    break;
			default:
				var check = false;
		}
		if(check){
			//动画，打开锁
			$$("#twc-qb .imgclose").hide();
			$$("#twc-qb .jm").hide();
			$$("#twc-qb .imgopen").show();
			//弹出电话录音
			myApp.popup('.popup-tel-record');
		}else{
			myApp.alert('密钥不正确');
			$$("input[name='my']").val('');
		}
	});
	
});